package cn.qingyun.gis.modules.baogan.vo;

import java.io.Serializable;
import java.util.List;
import java.util.Objects;
/**
 * @Author gongshengyue
 * @Description 包干团队
 * @Date 14:15 2024/10/25
 * @Param
 * @return
 **/
public class Team implements Serializable {
    private static final long serialVersionUID = 1L;

    /** 团队ID **/
    private String id;
    /** 团队名称 **/
    private String name;
    /** 队员 **/
    private List<TeamMate> teamMates;

    public Team(String teamId, String teamName, List<TeamMate> teamMates) {
        this.id = teamId;
        this.name = teamName;
        this.teamMates = teamMates;
    }


    @Override
    public boolean equals(Object obj) {
        if (this == obj) return true;  // 检查是否为同一个对象
        if (obj == null || getClass() != obj.getClass()) return false;  // 检查对象是否为null或类型是否相同
        Team entity = (Team) obj;
        return id == entity.id;  // 比较id是否相等
    }

    @Override
    public int hashCode() {
      return Objects.hash(id);
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<TeamMate> getTeamMates() {
        return teamMates;
    }

    public void setTeamMates(List<TeamMate> teamMates) {
        this.teamMates = teamMates;
    }
}
